fix setting up encryption with software based certificate storage
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 3 Feb 2025 09:14:08 +0000 (10:14 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 7 Feb 2025 08:12:29 +0000 (09:12 +0100)
some data need to be converted to or from base64

some data should not be converted

clear one such place where a conversion to base64 was too much

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/clientsideencryption.cpp

index 5aaa40bf5a9888f775f3effe3643cb12b9855a15..5392370c22d3e7a4279da5749e0342dbff5a9547 100644 (file)
@@ -1321,7 +1321,7 @@ bool ClientSideEncryption::checkPublicKeyValidity(const AccountPtr &account) con
     BIO_write(publicKeyBio, publicKeyPem.constData(), publicKeyPem.size());
     auto publicKey = PKey::readPublicKey(publicKeyBio);
 
-    auto encryptedData = EncryptionHelper::encryptStringAsymmetric(account->e2e()->getCertificateInformation(), account->e2e()->paddingMode(), *account->e2e(), data.toBase64());
+    auto encryptedData = EncryptionHelper::encryptStringAsymmetric(account->e2e()->getCertificateInformation(), account->e2e()->paddingMode(), *account->e2e(), data);
     if (!encryptedData) {
         qCWarning(lcCse()) << "encryption error";
         return false;